#ifndef CHATLISTWIDGET_H
#define CHATLISTWIDGET_H

#include <QWidget>
#include <QVariant>
#include "chatlistitem.h"
#include "Models/friend.h"
#include "Models/pagetype.h"
#include "Controls/suspendscrollbar.h"

namespace Ui {
class ChatListWidget;
}

class ChatListWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ChatListWidget(QWidget *parent = nullptr);
    ~ChatListWidget();

    void AddItem(Friend *data);

private:
    Ui::ChatListWidget *ui;
    ChatListItem *m_item;

private slots:
    void onItemSelected(ChatListItem *item);

signals:
    void onItemClicked(QVariant var, PageType type);
};

#endif // CHATLISTWIDGET_H
